<?php
//$string = 'Weekend  php';
///*
//$length = strlen($string);
//for ($i=($length-1) ; $i >= 0 ; $i--) {
  //echo $string[$i];
//}
////php dnekeeW
//*/
$i=0;
$newArr = array();
$string = 'Weekend';
while(isset($string[$i]))
{
  array_unshift($newArr,$string[$i]);
  $i++;
}
echo implode($newArr);
echo "\n\n";
